package com.ysc.chessfightbackend.controller;

import com.ysc.chessfightbackend.service.IUserService;
import com.ysc.chessfightbackend.util.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Version: 1.0
 * Class Name: UserController
 * Description: TODO(一句话描述功能)
 * Author: ysc
 * Date: 2024/6/22 16:30
 */
@Api(value = "用户Controller")
@RestController
@RequestMapping("/user")
@CrossOrigin
@RequiredArgsConstructor
public class UserController {

    private final IUserService userService;

    @ApiOperation("登录")
    @PostMapping("/login")
    public R login() {
        return userService.login();
    }
}
